package cn.vr.swing.Jpanel;
/*
 * 
 * author:黄龙
 * time:2016.8.1
 */
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;

import javax.swing.JButton;
import javax.swing.JPanel;
import javax.swing.JTable;
import javax.swing.table.TableCellRenderer;

public class MybuttonRender extends JPanel implements TableCellRenderer {

	/**
	 * Create the panel.
	 */
	
	private JButton edit;
	private JButton delete;
	public MybuttonRender() {
		setLayout(new GridBagLayout());
edit=new JButton("编辑");
delete=new JButton("删除");
GridBagConstraints constraints=new GridBagConstraints();

constraints.gridy=0;
constraints.gridx=0;
constraints.fill=constraints.NONE;
add(edit,constraints);


constraints.gridy=0;
constraints.gridx=1;
constraints.fill=constraints.NONE;
add(delete,constraints);
		
	}

	@Override
	public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus,
			int row, int column) {
		// TODO Auto-generated method stub
		return this;
	}

}
